export default function timer(timestamp){
  var date = new Date(timestamp);
  var Y = date.getFullYear() + '-';
  var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  var D = date.getDate() + ' ';
  D = D < 10 ? '0' + D : D
  var h = date.getHours();
  h = h < 10 ? '0' + h : h
  var m = date.getMinutes();
  m = m < 10 ? '0' + m : m
  return (Y + M + D + h + ':' + m);
}

